package com.hellobike.haxing.modules.product.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import com.hellobike.haxing.modules.product.entity.Province;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * @Description: 省份
 * @Author: haxing-boot
 * @Date:   2020-02-03
 * @Version: V1.0
 */
public interface ProvinceMapper extends BaseMapper<Province> {

    @Select("SELECT id, name FROM t_province WHERE EXISTS (SELECT 1 FROM t_shop WHERE province_id=t_province.id AND deleted=0)")
    List<Province> getOpenedProvinces();
}
